Conversation
6bf9c7a to
a96649c
Compare
dsobek
left a comment
There was a problem hiding this comment.
Makes sense, just going to give this a test in against MoveIt Pro before approving.
For the forward port, could you evaluate if it makes sense to merge the upstream of behaviortree.cpp into our fork? In particular, I realized that some of the validation logic I pointed to you exists in the upstream master branch, and so there might be some duplicate work there. I created a separate issue for this https://github.com/PickNikRobotics/moveit_pro/issues/17640.
Commit 8f86eb9 adds comprehensive name validation that fully covers our whitespace check and more. Merging upstream into our fork would make this PR's BT.CPP change redundant. Should I take on #17640? |
If we still want to get this fixed for |
src/xml_parsing.cpp
Outdated
| { | ||
| throw RuntimeError("Missing attribute [name] in port (SubTree model)"); | ||
| } | ||
| if(!IsAllowedPortName(name)) |
There was a problem hiding this comment.
So this is turning out to be a bit strict. This is saying that _collapsed is not a valid port name, which is true, but it is a valid attribute.
BehaviorTree.CPP/src/xml_parsing.cpp
Lines 661 to 710 in c852132
is where ports are being parsed and this function is used there just to separate ports from non-ports.
This is the reason for the ci failure here (I printed the errors).
I also saw this when testing the moveit pro PR.
Maybe lets just move the std::any_of statement here and call it a day.
7a847c7 to
9080eff
Compare
9080eff to
56b976a
Compare
std::isspacecheck toIsAllowedPortName()to reject port names containing whitespaceCreatePorterror message to mention the whitespace constraint